Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add failing test for filterBy #12538

Closed
wants to merge 165 commits into from
Closed

Conversation

csantero
Copy link
Contributor

DO NOT MERGE

I believe this test demonstrates behavior that used to work. The first deepEqual assertion passes but the second one fails.

This is related to #12475.

Alan and others added 30 commits August 27, 2015 15:53
Prior to this change, a setter that exists on the prototype of the
object was not detected and was effectively clobbered.

This change updates `handleMandatorySetter` to check both the objects
own descriptors and its prototypes descriptors.

Also removed the guard for `Object.getOwnPropertyDescriptor` since all
supported platforms are ES5.
[DOC beta] Add link to `Ember.Component#defaultLayout` deprecation guide.
Contextual components show a message when passed null or unknown component
paths.
QUnit 1.19 was released and changed the way the npm package exports its
value (it no longer sets up `global.QUnit` and all the assertion methods
automatically).

This updates to a better pattern of importing `QUnit` and using the
`assert` argument for assertions.
This flag is no longer needed now that this feature is out of beta.
…ponents

[BUGFIX] Fix contextual components handling invalid component paths
Remove `ember-registry-container-reform` feature flag.
When specifying `postionalParams` like this:

```javascript
App.FooBarComponent = Ember.Component.extend();

App.FooBarComponent.reopenClass({
  positionalParams: 'allTheThings'
});
```

You should be able to avoid using positional params by specifying
`allTheThings` as a hash argument:

```hbs
{{foo-bar allTheThings=blah}}
```

Unfortunately, we were triggering an assertion that you used a positional
param that conflicted with a hash param.  This change fixes that
assertion by avoiding doing any work when no params are specified.
…al-params

[BUGFIX release] Ensure rest arg positionalParams can be omitted.
…erating

[BUGFIX Beta] Move warn api doc to a place where it gets picked up by the build
Due to the nature of `positionalParams`, it is trivial to supply
`params` as a hash argument to `{{link-to}}` instead of ordered args
(this allows truly dynamic link's). However, if `{{link-to params=foo}}`
is used `params` will be a `MutableCell` and the current code throws an
error in that circumstance.

*tldr;* `this.attrs` should be avoided. It is quite a 🧌 in
non-`GlimmerComponent`'s.
Due to values in `this.attrs` being either a `MutableCell` or the actual
value, many flags in `link-to` would not function properly when provided
a bound property.
When compute is called it is expected that object is an actual Object,
sometimes the object is a Bool or String and yet we continue down the stack look
values up on it even though the result will be undefined. This change
bails out early if `object` is a Bool or String.
[BUGFIX beta] Allow usage of bound properties in {{link-to}}.
[PERF] Bail on get if type does not have accessors
We check to see if a function contains `_super` / `.call` / `.apply`
before attempting to super wrap a given method (this saves quite a bit
of extra super wrapping for functions that do not need it).
Unfortunately, a number of platforms that we support do not support
calling `func.toString()` so we attempt to detect this and fall back
to always super wrap everything mode.

We have roughly this code (from
[here](https://github.com/emberjs/ember.js/blob/b4718218dbe5ffe7736c485a594248b20977c621/packages/ember-metal/lib/utils.js#L257-L271))
to detect if we can call `toString()` and get the original source:

```javascript
  let sourceAvailable = (function() {
    return this;
  }).toString().indexOf('return this;') > -1;
```

This works perfectly for development builds, but unfortunately not
when minified.  Take a look at the minified source and you will see why:

```javascript
var e=function(){return this}.toString().indexOf("return this;")>-1;
```

Note that minifier has stripped the trailing semicolon from the function
body we are attempting to check against, but sadly our `indexOf` check
still contains the semicolon!

**tldr;** We super wrap every function in uglified builds.

---

This commit removes the trailing semicolon from the source check, and
adds a test that should hopefully allow us to detect if this is
accidentally reintroduced.
…thing

[BUGFIX release] Fix uglification introduced bug with super wrapping.
stefanpenner and others added 19 commits November 15, 2015 11:01
A similar feature is being proposed for ES. The syntax is still up in the air, and it will be async. But we can make use of this today
…extendable factories.

The fake container is required to provide access to the `container`
during instantiation of objects by non-extendable factories.

The fake container provides access to the following methods:

* `lookup`
* `lookupFactory`

Deprecation warnings are provided that direct the user to call
`getOwner` followed by the equivalent `ContainerProxy` methods
(`lookup` and `_lookupFactory`) on the owner.
native-array -> mutable-array -> enumerable -> native-array

To construct native-array enumerable must have been evaluated. By 
ensuring enumerable EmberA is lazy, all this works without leaking
the cycle out.
 * move Ember.computed.collect back to runtime (its test are already there)
[FEATURE ember-container-inject-owner] Inject fake container with deprecations.
Remove internal references to the Ember Global
[PERF] Fix Mixin shape issues

Fix emberjs#12606

Make Mixin monomorphic and use debugSeal in development builds to flag issues.
…ple, r=rwjblue

[DOC release] Add example and clear up wording for CP get/set

This PR makes the following changes to `Ember.computed` API documentation:
 - Changes the `fullName` getter function to match [the example in the latest guides](http://guides.emberjs.com/v2.1.0/object-model/computed-properties/). This involved changing to a template string from a string concatenation.
 - Switches class property default values to be defined in `init()` instead ([suggested](emberjs#12619 (comment)))
 - Minor changes to wording and sentence structure, mostly adding articles.
 - Adds an example that uses the hash format with `get` and `set`
 - Removes confusing/incorrect phrase:

 > The `get` function should accept two parameters, `key` and `value`.

My one concern is that the two examples are very similar except for a few lines. Would it be more helpful if the second example only included the computed property (rather than the whole class and usage example)?
@homu
Copy link
Contributor

homu commented Nov 17, 2015

☔ The latest upstream changes (presumably 0c3b904) made this pull request unmergeable. Please resolve the merge conflicts.

@stefanpenner
Copy link
Member

93 commits, is a bit big for us to review. Can you clean this up?

@rwjblue
Copy link
Member

rwjblue commented Nov 17, 2015

@stefanpenner - Likely my fault. Since this targeted release branch, when I rolled beta to release a whole bunch more commits dumped in there messing up this diff.

@csantero
Copy link
Contributor Author

@rwjblue I'll submit a new PR targeting master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.